package com.springsource.mvc.HandlerMappingAndHandlerAdapter;

import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class MyRequestMappingHandlerAdapter extends RequestMappingHandlerAdapter {

    @Override
    public ModelAndView invokeHandlerMethod(HttpServletRequest request, HttpServletResponse response, HandlerMethod handlerMethod) {
        try {
            return super.invokeHandlerMethod(request, response, handlerMethod);
        } catch (Exception e) {
            e.printStackTrace();
            return null;
        }
    }
}
